<html>
<head><meta charset="utf-8"><title>wait-forked-but-failed-child · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html">wait-forked-but-failed-child</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225488282"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225488282" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225488282">(Feb 07 2021 at 22:44)</a>:</h4>
<p>This test fails without <code>ps</code> available on the system running tests. Does anybody have any ideas how this test could be rewritten to not rely on <code>ps</code>?</p>



<a name="225488293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225488293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225488293">(Feb 07 2021 at 22:45)</a>:</h4>
<p>what systems don't have ps?</p>



<a name="225488389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225488389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225488389">(Feb 07 2021 at 22:47)</a>:</h4>
<p>A <code>--pure</code> nix-shell is how I hit it. <code>ps</code> comes from a separate package typically (<code>procps</code>) so its easy to imagine e.g. a minimal docker container not having it available as well.</p>



<a name="225489649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225489649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225489649">(Feb 07 2021 at 23:16)</a>:</h4>
<p>Btw, what test are you referring to?</p>



<a name="225490153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225490153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225490153">(Feb 07 2021 at 23:30)</a>:</h4>
<p><code>./src/test/ui/wait-forked-but-failed-child.rs</code></p>



<a name="225492119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225492119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> NeoRaider <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225492119">(Feb 08 2021 at 00:15)</a>:</h4>
<p>The test could read <code>/proc/*/stat</code> or <code>/proc/*/status</code> directly (both contain the necessary information); this is what ps does internally as well. It would also allow for a nicer check for zombie status than looking for the "defunct" string, as these files have a dedicated process status field.</p>



<a name="225492270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225492270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225492270">(Feb 08 2021 at 00:19)</a>:</h4>
<p>Would doing so be portable across all unixes?</p>



<a name="225492344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225492344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225492344">(Feb 08 2021 at 00:20)</a>:</h4>
<p>Seems like macOS doesn't have a <code>procfs</code> at least <span aria-label="frown" class="emoji emoji-1f641" role="img" title="frown">:frown:</span></p>



<a name="225492448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/wait-forked-but-failed-child/near/225492448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> NeoRaider <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/wait-forked-but-failed-child.html#225492448">(Feb 08 2021 at 00:23)</a>:</h4>
<p>No, AFAIK procfs is completely specific to Linux. "ps" is the abstraction provided by the POSIX standard.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>